package com.lightboat.system.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lightboat.common.annotation.Excel;
import com.lightboat.common.core.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.SchemaProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 物流记录对象 crm_logistics_record
 * 
 * @author lightboat
 * @date 2025-08-22
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(title = "物流记录")
@TableName(value = "crm_logistics_record", autoResultMap = true)
public class CrmLogisticsRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @Schema(title = "主键ID")
    @TableId
    private Long id;

    /** 订单ID */
    @SchemaProperty(name = "订单ID")
    @Excel(name = "订单ID")
    private Long orderId;

    /** 外部订单ID */
    @SchemaProperty(name = "外部订单ID")
    @Excel(name = "外部订单ID")
    private String externalOrderId;

    /** 收件人姓名 */
    @SchemaProperty(name = "收件人姓名")
    @Excel(name = "收件人姓名")
    private String receiverName;

    /** 收件人公司 */
    @SchemaProperty(name = "收件人公司")
    @Excel(name = "收件人公司")
    private String receiverCompany;

    /** 收件人手机号 */
    @SchemaProperty(name = "收件人手机号")
    @Excel(name = "收件人手机号")
    private String receiverPhone;

    /** 收件人地址 */
    @SchemaProperty(name = "收件人地址")
    @Excel(name = "收件人地址")
    private String receiverAddress;

    /**
     * 物流状态（0 待发货 1已签收 2拒绝签收 3已发货,4取消，5拦截中，6拦截成功）
     */
    @SchemaProperty(name = "物流状态（0 待发货 1已签收 2拒绝签收 3已发货,4取消，5拦截中，6拦截成功）")
    @Excel(name = "物流状态")
    private String logisticsStatus;

    /** 物流公司 */
    @SchemaProperty(name = "物流公司")
    @Excel(name = "物流公司")
    private String logisticsCompany;

    /** 物流单号 */
    @SchemaProperty(name = "物流单号")
    @Excel(name = "物流单号")
    private String logisticsNo;

    /** 物流订单 */
    @SchemaProperty(name = "物流订单")
    @Excel(name = "物流订单")
    private String logisticsOrder;

    /** 物流编码 */
    @SchemaProperty(name = "物流编码")
    @Excel(name = "物流编码")
    private String logisticsCode;

    /** 物流产品编码 */
    @SchemaProperty(name = "物流产品编码")
    @Excel(name = "物流产品编码")
    private String logisticsProductCode;

    /** 物流价格 */
    @SchemaProperty(name = "物流价格")
    @Excel(name = "物流价格")
    private BigDecimal logisticsPrice;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderId", getOrderId())
            .append("externalOrderId", getExternalOrderId())
            .append("receiverName", getReceiverName())
            .append("receiverCompany", getReceiverCompany())
            .append("receiverPhone", getReceiverPhone())
            .append("receiverAddress", getReceiverAddress())
            .append("logisticsStatus", getLogisticsStatus())
            .append("logisticsCompany", getLogisticsCompany())
            .append("logisticsNo", getLogisticsNo())
            .append("logisticsOrder", getLogisticsOrder())
            .append("logisticsCode", getLogisticsCode())
            .append("logisticsProductCode", getLogisticsProductCode())
            .append("logisticsPrice", getLogisticsPrice())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
